using System;

using Microsoft.Win32;

using SBPweb.Modules.Modularity;
using SBPweb.Contracts.Implementation;

namespace SBPweb.Contracts
{
	/// <summary>
	/// Interface of IStatePersistenceService
	/// </summary>
	public interface IStatePersistenceService : IService
	{
		/// <summary>
		/// Application resistry root
		/// </summary>
		string ApplicationRegistryRoot
		{
			get;
			set;
		}

		/// <summary>
		/// Application registry key
		/// </summary>
		RegistryKey ApplicationRegistryKey
		{
			get;
		}

		/// <summary>
		/// Contains
		/// </summary>
		/// <param name="id">is</param>
		/// <returns>success</returns>
		bool Contains(IPersistable id);
		/// <summary>
		/// Load
		/// </summary>
		/// <param name="id">id</param>
		/// <returns>persistency dictionary</returns>
		PersistencyDictionary Load(IPersistable id);
		/// <summary>
		/// Remove
		/// </summary>
		/// <param name="id">id</param>
		void Remove(IPersistable id);
		/// <summary>
		/// Save
		/// </summary>
		/// <param name="id">id</param>
		/// <param name="state">state</param>
		void Save(IPersistable id, PersistencyDictionary state);
	}

}
